package com.helsinki.controller;

import com.github.pagehelper.PageInfo;
import com.helsinki.pojo.Orders;
import com.helsinki.pojo.SysLog;
import com.helsinki.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/syslog")
public class SyslogController {
    @Autowired
    private SysLogService sysLogService;

    @RequestMapping("list")
    @ResponseBody
    public PageInfo<SysLog> list(@RequestParam(defaultValue = "1") Integer pageNum,
                                 @RequestParam(defaultValue = "10") Integer pageSize) {
        return sysLogService.queryAll(pageNum,pageSize);
    }
}